<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<!-- <li>
								用户编号：<input type="text" name="userId"/>
							</li>

							<li>
								宠物昵称：<input type="text" name="petName"/>
							</li>

							<li>
								宠物详情：<input type="text" name="lostDetail"/>
							</li> -->

							
							<li class="select-time">
							    <label>发布时间： </label>
							    <input type="text" class="time-input" id="createstartTime" placeholder="开始时间" name="params[createbeginTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="createendTime" placeholder="结束时间" name="params[createendTime]"/>
								<!-- 交易时间：<input type="text" name="chargeTime"/> -->
							</li>



							<!-- <li>
								走失地址：<input type="text" name="lostAddress"/>
							</li>

							<li>
								赏金金额：<input type="text" name="feeTotal"/>
							</li> -->

							
							
							<li class="select-time">
							
							<label >采纳状态：</label>
							
                               <select  name="cdState" id="cdState" onchange="$.table.search()" >
                                <option ></option>
                                <option value="0">未采纳</option>
                                <option value="1">已采纳  </option>
                               
                                </select>
                                
							</li>

							
							
						
							
							
							<!--  <li class="select-time">
							
							<label >显示状态： </label>
							
                               <select  name="isShow" id="isShow" onchange="$.table.search()" >
                                <option ></option>
                                <option value="0">下架</option>
                                <option value="1">上架显示 </option>
                                </select>
                                
							</li>

							<li>
								宠物信息：<input type="text" name="petId"/>
							</li>

							-->
							
							<li class="select-time">
							
							<label >审核状态：</label>
							
                               <select  name="checkState" id="checkState" onchange="$.table.search()" >
                                <option value="" label="所有"></option>
                                <option value="0">未审核</option>
                                <option value="1">审核通过 </option>
                                <option value="2">未通过 </option>
                                </select>
                                
							</li>

							
<!-- 
							<li>
								手机：<input type="text" name="telephone"/>
							</li>

							<li>
								审核管理员：<input type="text" name="checkAdmin"/>
							</li> -->

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
				
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="gxgw_modules:lost:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="gxgw_modules:lost:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('gxgw_modules:lost:edit')}]];
        var removeFlag = [[${@permission.hasPermi('gxgw_modules:lost:remove')}]];
        var prefix = ctx + "gxgw_modules/lost";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "寻宠启示记录",
				search: false,
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'lostId', 
					title : '序号',
					visible: false
				},
				{
					field : 'userId', 
					title : '用户编号',
					sortable: true
				},
				{
					field : 'petName', 
					title : '宠物昵称',
					sortable: true
				},
				{
					field : 'lostDetail', 
					title : '宠物详情',
					sortable: true
				},
				{
					field : 'createDate', 
					title : '发布时间',
					sortable: true
				},
				{
					field : 'lostUrl', 
					title : '启示描述图片',
					sortable: true
				},
				{
					field : 'lostTime', 
					title : '丢失时间',
					sortable: true
				},
				{
					field : 'lostAddress', 
					title : '走失地址',
					sortable: true
				},
				{
					field : 'feeTotal', 
					title : '赏金金额',
					sortable: true
				},
				{
					field : 'cdState', 
					title : '采纳状态',
					sortable: true,
					formatter: function (value) {
						switch (value) {
							case 0:
								return '未采纳'
							case 1:
								return '已采纳'
							
						}
					}
				},
				{
					field : 'cdDate', 
					title : '采纳时间',
					sortable: true
				},
				{
					field : 'clueId', 
					title : '采纳线索用户',
					sortable: true
				},
				{
					field : 'isShow', 
					title : '显示状态',
					sortable: true,
					formatter: function (value) {
						switch (value) {
							case 0:
								return '下架'
							case 1:
								return '上架显示'
							
						}
					}
				},
				{
					field : 'petId', 
					title : '宠物信息',
					sortable: true
				},
				{
					field : 'checkState', 
					title : '审核状态',
					sortable: true,
					formatter: function (value) {
						switch (value) {
							case 0:
								return '未审核'
							case 1:
								return '审核通过'
							case 2:
								return '审核不通过'
							
						}
					}
				},
				
				{
					field : 'telephone', 
					title : '手机',
					sortable: true
				},
				{
					field : 'checkDate', 
					title : '审核时间',
					sortable: true
				},
				{
					field : 'checkAdmin', 
					title : '审核管理员',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.lostId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.lostId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>